package org.thanos.demo.api;

import org.thanos.demo.entity.Demo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(name = "feign-service", fallback = DemoServiceFallback.class)
public interface DemoService {

    @RequestMapping(value = "/feign-service/get")
    String getDemo(@RequestParam("name") String name);

    @RequestMapping(value = "/feign-service/get/{name}")
    String getDemoParam(@PathVariable("name") String name);

    @RequestMapping(value = "/feign-service/serviceHead")
    String postDemo(@RequestParam("name") String name);

    @RequestMapping(value = "/feign-service/servicePost")
    String requestDemo(@RequestBody Demo demo);
}
